package com.example.ShoppingManagementSystem.repository;

import com.example.ShoppingManagementSystem.entity.CartItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface CartItemRepository  extends JpaRepository<CartItem, Integer> {
    CartItem findByCustomerIdAndProductId(int customerId, int productId);

    void deleteByCustomerIdAndProductId(int customerId, int productId);

    List<CartItem> findAllByCustomerId(int customerId);
}
